#!/bin/bash

# sleep 2
# # 添加本地执行路径
# stop(){
#     echo "停止"
#     ps -efww | grep -w 'test_device' | grep -v grep | cut -c 9-16 | xargs kill -9
# }

# while false; do
#     # 启动一个循环，定时检查进程是否存在
#     server=$(ps -e | grep test_device | grep -v grep)
#     echo $serverd
#     if [ ! "$server" ]; then
#         echo "test_device,重新启动"
#         # 如果不存在就重新启动
#         nohup test_device > /home/qdu-rm/Desktop/log/test_device.log &
#         # 启动后沉睡5s
#         sleep 5
#     else
#         echo "test_device存活"
#     fi
#     # 每次循环沉睡5s
#     sleep 5
# done

/home/qdu-rm/Desktop/lzq/robotics/build/tests/device/test_device